<template>
  <div id="app">
    <h2>count --- {{count}}</h2>
    <!-- 5.路由出口 -->
    <router-view class="box"></router-view>
    <!-- 6.路由导航 -->
    <router-link :to='{name:"home"}'>首页</router-link>
    <router-link :to='{name:"find"}'>发现</router-link>
    <router-link :to='{name:"mine"}'>我的</router-link>
    <router-link :to='{name:"vuex"}'>vuex</router-link>
  </div>
</template>

<script>
import Home from './views/Home.vue'
export default {
  components:{
    Home
  },
  computed:{
    count(){
      return this.$store.state.count
    }
  }
}
</script>

<style lang="scss">
.router-link-exact-active , .router-link-active{
  padding: 5px;
  background: #f50;
  color: #fff;
  margin: 4px;
  border-radius: 10px;
}
.box{
  min-height: 600px;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
